﻿using System;

namespace CSEngine
{
    /// <summary>
    /// An AI that makes random moves each time
    /// </summary>
    public sealed class EasyAI: AI
    {
        private static Random rand = new Random();

        public EasyAI()
        { }

        public Move GetNextMove(object sender, PlayerTurnArgs e)
        {
            HexDigit x, y;
            do
            {
                x = (HexDigit)(rand.Next(15) + 1);
                y = (HexDigit)(rand.Next(15) + 1);
            } while (e.Board.GetSpace(x, y).Color != GameBoard.GameBoardSpace.SpaceColor.EMPTY);

            return new Move(x, y);
        }
    }
}
